import { isDev, getRequest, postRequest } from '@/api';

const urlsObj = {};
if (isDev) {
  /* ********编码配置 code 供应链********* */
  urlsObj.getConCodeList = getRequest('concodeList');
  urlsObj.getCodeDataSource = getRequest('concodedatasources');
  urlsObj.getConCodeDetail = getRequest('concodedetail');
  urlsObj.submitConCodeDetail = postRequest('submitConCodeDetail');
  /* ********数据配置 data 组织********* */
  urlsObj.getCompanyDetail = postRequest('getCompanyDetail');
  urlsObj.updateCompanyDetail = postRequest('updateCompanyDetail');
  urlsObj.getDepartmentsDetail = postRequest('getDepartmentsDetail');
  urlsObj.updateDepartmentsDetail = postRequest('updateDepartmentsDetail');
  /* ********数据配置 data 供应链********* */
  urlsObj.getDataSupplyChainDetail = postRequest('getDataSupplyChainDetail');
  urlsObj.updateDataSupplyChainDetail = postRequest('updateDataSupplyChainDetail');
  urlsObj.getDataType = getRequest('getDataType');
  urlsObj.getDataDetail = getRequest('getDataDetail');
  urlsObj.saveDataDetail = postRequest('saveDataDetail');
} else {
  /* ********编码配置 code 供应链********* */
  urlsObj.getConCodeList = getRequest('configuration/supplychain/coders/list');
  urlsObj.getCodeDataSource = getRequest('configuration/supplychain/coders/datasources/list/{coder}');
  urlsObj.getConCodeDetail = getRequest('configuration/supplychain/coders/detail/{id}');
  urlsObj.submitConCodeDetail = postRequest('configuration/supplychain/coders/add');
  /* ********数据配置 data 组织********* */
  urlsObj.getCompanyDetail = postRequest('company/detail');
  urlsObj.updateCompanyDetail = postRequest('company/save');
  urlsObj.getDepartmentsDetail = postRequest('department/tree');
  urlsObj.updateDepartmentsDetail = postRequest('department/saveAll');
  /* ********数据配置 data 供应链********* */
  urlsObj.getDataSupplyChainDetail = getRequest('configuration/supplychain/customcategory/detail');
  urlsObj.updateDataSupplyChainDetail = postRequest('configuration/supplychain/customcategory/update');
  urlsObj.getDataType = getRequest('basicController/basicList');
  urlsObj.getDataDetail = getRequest('basicController/query/{secondType}');
  urlsObj.saveDataDetail = postRequest('basicController/add');
}

export default urlsObj;
